﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace App7._8
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();

            NameCard card1 = new NameCard();
            card1.Name = "Wenwen Che";
            card1.Address = "New York";

            NameCard card2 = new NameCard();
            card2.Name = "Xia Zhong";
            card2.Address = "Shanghai";

            list.Items.Add(card1);
            list.Items.Add(card2);
        }
    }

    class NameCard : Object
    {
        string _name;
        string _address;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public string Address
        {
            get { return _address; }
            set { _address = value; }
        }
    }
}
